package org.zoomdev.zoom.dao.adapters.parameter;

import org.zoomdev.zoom.dao.adapters.ParameterAdapter;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.time.Year;

// Java 8 LocalDate类型适配器
public class YearParameterAdapter implements ParameterAdapter<Year> {
    @Override
    public void setNonnullParameter(PreparedStatement ps, int index, Year data) throws SQLException {
        ps.setInt(index, data.getValue());
    }
}
